<?php

namespace app\admin\controller;
use think\exception\ValidateException;
use app\admin\model\Autotime as AutotimeModel;
use think\facade\Db;

class Autotime{

    function protect_time(){
       $time = time();
       Db::name('resource')->where('protect_time','<=',$time)->where('protect_user_id','>',0)->update(array('protect_time'=>NULL,'protect_user_id'=>'','unprotect'=>1,'connection_type'=>''));
    }
    
    function message_clear_ip(){
        $time = time();
        Db::name('check_gather')->where('error_step',357)->delete();
        Db::name('check_gather')->where('error_step',358)->delete();
    }
    
    function page_count_config(){
        $time = time();
        Db::name('page_count_config')->where('id',1)->update(array('page_count'=>6,'add_time'=>$time));
        
        
    }
	
}